package com.yunhe.sms.control;

import com.yunhe.sms.view.AdminHome;

/**
 * 用户业务控制路由
 */
public class AdminHomeController implements HomeController{

    private static AdminHomeController instance;  //组合自己

    private AdminHomeController(){} //  构造器私有化

    //提供获取自己的方法（并能实例化自己）
    public static AdminHomeController getInstance(){
        if (instance==null) {
            instance = new AdminHomeController();
        }
        return instance;
    }

    /**
     * 主页面路由
     */
    public void homeRoute(){
        int i = AdminHome.adminHomeUI();  //展示主页面，并获得操作码
        switch (i) {
            case 1:TeacherController.teacherControlroute();break;
            case 2:UserController.userRoute();break;
            case 3: LoginController.logout();break;  //退出
        }
    }
}
